<template>
  <div class="drug-recommendations">
    <h1>替代药物推荐</h1>
    
    <div class="recommendations-info">
      <p>基于风险评估结果，系统为您提供以下替代药物推荐方案。</p>
    </div>
    
    <div class="recommendations-list">
      <h2>推荐方案</h2>
      
      <div class="recommendation-card">
        <div class="recommendation-header">
          <h3>高风险药物替代方案</h3>
        </div>
        
        <div class="recommendation-details">
          <p><strong>原药物:</strong> 华法林</p>
          <p><strong>风险:</strong> 与阿司匹林合用增加出血风险</p>
          <p><strong>推荐替代药物:</strong> 利伐沙班</p>
          <p><strong>替代药物描述:</strong> 直接口服抗凝药(DOACs)，出血风险相对较低，无需常规监测凝血功能</p>
          <p><strong>注意事项:</strong></p>
          <ul>
            <li>适用于非瓣膜性房颤患者</li>
            <li>费用相对较高</li>
            <li>肾功能不全患者需调整剂量</li>
          </ul>
        </div>
      </div>
      
      <div class="recommendation-card">
        <div class="recommendation-header">
          <h3>用药优化建议</h3>
        </div>
        
        <div class="recommendation-details">
          <p><strong>建议:</strong> 如果必须使用华法林和阿司匹林，应：</p>
          <ul>
            <li>密切监测INR值，目标范围2.0-3.0</li>
            <li>定期检查血常规，注意出血征象</li>
            <li>患者教育，告知出血风险症状</li>
            <li>避免同时使用其他影响凝血的药物</li>
          </ul>
        </div>
      </div>
    </div>
    
    <div class="navigation-buttons">
      <button @click="goToRiskAssessment" class="back-btn">返回风险评估</button>
      <button @click="goToDoctorReview" class="next-btn">医生审核界面</button>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

// 跳转到风险评估页面
const goToRiskAssessment = () => {
  router.push('/risk-assessment')
}

// 跳转到医生审核页面
const goToDoctorReview = () => {
  router.push('/doctor-review')
}
</script>

<style scoped>
.drug-recommendations {
  max-width: 1200px;
  margin: 0 auto;
}

.recommendations-info {
  background-color: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}

.recommendations-list h2 {
  color: #42b983;
  border-bottom: 2px solid #42b983;
  padding-bottom: 0.5rem;
}

.recommendation-card {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recommendation-header h3 {
  margin: 0 0 1rem 0;
  color: #1976d2;
}

.recommendation-details p {
  margin: 0.5rem 0;
}

.recommendation-details ul {
  margin: 0.5rem 0 0.5rem 1.5rem;
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.back-btn,
.next-btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
}

.back-btn {
  background-color: #6c757d;
  color: white;
}

.back-btn:hover {
  background-color: #5a6268;
}

.next-btn {
  background-color: #1976d2;
  color: white;
}

.next-btn:hover {
  background-color: #1565c0;
}

@media (max-width: 768px) {
  .navigation-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .back-btn,
  .next-btn {
    width: 100%;
  }
}
</style>